package com.dao.manager.imp;

import java.util.List;

import javax.annotation.Resource;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.stereotype.Repository;

import com.dao.manager.MessageDaoW;
import com.po.MessageBeanW;

@Repository
public class MessageDaoImpW implements MessageDaoW {

	@Resource(name="sqlSessionTemplate")
	private SqlSessionTemplate sqlSessionTemplate;
	@Override
	public List<MessageBeanW> getMessageListW(MessageBeanW message) {
		// TODO Auto-generated method stub
		List<MessageBeanW> list = sqlSessionTemplate.selectList("getMessageListW", message);
		return list;
	}
	@Override
	public int delMessageW(String[] array) {
		// TODO Auto-generated method stub
		int result = sqlSessionTemplate.delete("delMessageW", array);
		return result;
	}
	@Override
	public int updateMessageW(MessageBeanW message) {
		// TODO Auto-generated method stub
		int result = sqlSessionTemplate.update("updateMessageW", message);
		return result;
	}

}
